﻿using Mogre;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ObjCore.MOgreExt
{
    public static class Vector3Ext
    {
        public static Vector3 ParseV(this string line)
        {
            var ss = line.Split(new string[1] { " "}, StringSplitOptions.None);
            var res = new Vector3();
            res.x = float.Parse(ss[1]);
            res.y = float.Parse(ss[2]);
            res.z = float.Parse(ss[3]);

            return res;
        }

        public static Vector3 ParseVn(this string line)
        {
            return ParseV(line);
        }

        public static string ToV(this Vector3 v3)
        {
            return $"v {v3.x:F6} {v3.y:F6} {v3.z:F6}";
        }
        public static string ToVn(this Vector3 v3)
        {
            return $"vn {v3.x:F6} {v3.y:F6} {v3.z:F6}";
        }
    }
}
